package com.liang.buffer;

import java.io.*;
import java.util.Arrays;

public class Text {
    public static void main(String[] args) throws IOException {


        BufferedReader br = new BufferedReader(new FileReader("day_13\\a.txt"));
        BufferedWriter bw = new BufferedWriter(new FileWriter("day_13\\a.txt",true));

        String str;

        str = br.readLine();
        String[] split = str.split(" ");
        int[] arr = new int[split.length];
        for (int i = 0; i < split.length; i++) {
            arr[i] = Integer.parseInt(split[i]);
        }

        System.out.println(Arrays.toString(arr));
        Arrays.sort(arr);
        bw.newLine();
        for (int i = 0; i < arr.length; i++) {
            bw.write(arr[i]+" ");
            bw.flush();
        }

        br.close();
        bw.close();
    }

}
